<?php namespace Summer\Shop\Updates;

use Schema;
use Winter\Storm\Database\Updates\Migration;

class BuilderTableCreateSummerShopScoreGoods extends Migration
{
    public function up()
    {
        Schema::create('summer_shop_score_goods', function($table)
        {
            $table->engine = 'InnoDB';
            $table->increments('id')->unsigned();
            $table->timestamp('created_at')->nullable();
            $table->timestamp('updated_at')->nullable();
            $table->integer('product_id');
            $table->integer('stock')->nullable();
            $table->integer('sales')->nullable();
            $table->decimal('price', 14, 2);
            $table->decimal('score', 14, 2);
            $table->integer('status')->nullable()->default(0);

        });
    }
    
    public function down()
    {
        Schema::dropIfExists('summer_shop_score_goods');
    }
}
